<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    section{
      width:1000px;
      height:300px;
      border:2px solid pink;
      margin:100px auto;
      display: flex;
      /*让子元素从父容器的开头开始排序 盒子顺序不变*/
      /* justify-content:flex-start; */
       /*让子元素从父容器的结尾开始排序 盒子顺序不变*/
      /* justify-content:flex-end; */
      /* 让子元素在父容器中间显示 */
      /* justify-content:center; */
      /* 左右的盒子贴近父盒子，中间的平均分布空白间距 */
      /* justify-content:space-between; */
      /* 相当于个每个盒子添加了左右margin外边距 */
      justify-content:space-around;

    }
    section div{
      width:250px;
      height:100%;
    }
    section div:nth-child(1){
      background-color: #f00;
    }
    section div:nth-child(2){
      background-color: #f0f;
    }
    section div:nth-child(3){
      background-color: #ff0;
    }
  </style>
</head>
<body>
  <section>
    <div></div>
    <div></div>
    <div></div>
  </section>
</body>
</html>